package com.qianfeng.shopping.service;

import com.qianfeng.shopping.dao.AccountDao;
import com.qianfeng.shopping.dao.AccountDaoImpMap;
import com.qianfeng.shopping.entity.Account;

import java.util.Map;

// 业务逻辑层
public class AccountServiceImp implements AccountService{
    AccountDao accountDao = new AccountDaoImpMap();
    @Override
    public Account login(Account account) {
        //  service调用dao层
        return accountDao.login(account);
    }

    @Override
    public Map<String, Account> selectAll() {
        return accountDao.selectAll();
    }

    @Override
    public boolean checkName(String name) {
        return accountDao.checkAccountName(name);
    }

    @Override
    public Account selectAccount(String id) {
        return accountDao.selectAccount(id);
    }
}
